-- GENERATED SPELL FOR [Netharel] --


function spell0_21164(pUnit, Event) --@Debilitating Strike,n/a--
pUnit:FullCastSpellOnTarget(39135,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21164', 668, 1)
end

function spell1_21164(pUnit, Event) --@Evasion,Self--
pUnit:FullCastSpellOnTarget(37683,pUnit)
pUnit:RegisterEvent('Sorts_21164', 10289, 1)
end

function spell2_21164(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(39262,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21164', 1000, 1)
end

function spell3_21164(pUnit, Event) --@Metamorphosis,Self--
pUnit:FullCastSpellOnTarget(36298,pUnit)
pUnit:RegisterEvent('Sorts_21164', 590, 1)
end

function Sorts_21164(pUnit, Event)
local choix_sorts_21164 = math.random(0, 3)
if choix_sorts_21164 == 0 then
pUnit:RegisterEvent('spell0_21164', 1, 1)
end
if choix_sorts_21164 == 1 then
pUnit:RegisterEvent('spell1_21164', 1, 1)
end
if choix_sorts_21164 == 2 then
pUnit:RegisterEvent('spell2_21164', 1, 1)
end
if choix_sorts_21164 == 3 then
pUnit:RegisterEvent('spell3_21164', 1, 1)
end
end

function mob21164_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21164', math.random(1500, 3000), 1)
end

function mob21164_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21164_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21164_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21164, 1, 'mob21164_Action')
RegisterUnitEvent(21164, 2, 'mob21164_Leave')
RegisterUnitEvent(21164, 3, 'mob21164_Kill')
RegisterUnitEvent(21164, 4, 'mob21164_Die')
